package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PropertyFamilyMapper;
import com.ruoyi.system.domain.PropertyFamily;
import com.ruoyi.system.service.IPropertyFamilyService;

/**
 * 家庭成员Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PropertyFamilyServiceImpl implements IPropertyFamilyService 
{
    @Autowired
    private PropertyFamilyMapper propertyFamilyMapper;

    /**
     * 查询家庭成员
     * 
     * @param familyId 家庭成员主键
     * @return 家庭成员
     */
    @Override
    public PropertyFamily selectPropertyFamilyByFamilyId(Long familyId)
    {
        return propertyFamilyMapper.selectPropertyFamilyByFamilyId(familyId);
    }

    /**
     * 查询家庭成员列表
     * 
     * @param propertyFamily 家庭成员
     * @return 家庭成员
     */
    @Override
    public List<PropertyFamily> selectPropertyFamilyList(PropertyFamily propertyFamily)
    {
        return propertyFamilyMapper.selectPropertyFamilyList(propertyFamily);
    }

    /**
     * 新增家庭成员
     * 
     * @param propertyFamily 家庭成员
     * @return 结果
     */
    @Override
    public int insertPropertyFamily(PropertyFamily propertyFamily)
    {
        return propertyFamilyMapper.insertPropertyFamily(propertyFamily);
    }

    /**
     * 修改家庭成员
     * 
     * @param propertyFamily 家庭成员
     * @return 结果
     */
    @Override
    public int updatePropertyFamily(PropertyFamily propertyFamily)
    {
        return propertyFamilyMapper.updatePropertyFamily(propertyFamily);
    }

    /**
     * 批量删除家庭成员
     * 
     * @param familyIds 需要删除的家庭成员主键
     * @return 结果
     */
    @Override
    public int deletePropertyFamilyByFamilyIds(Long[] familyIds)
    {
        return propertyFamilyMapper.deletePropertyFamilyByFamilyIds(familyIds);
    }

    /**
     * 删除家庭成员信息
     * 
     * @param familyId 家庭成员主键
     * @return 结果
     */
    @Override
    public int deletePropertyFamilyByFamilyId(Long familyId)
    {
        return propertyFamilyMapper.deletePropertyFamilyByFamilyId(familyId);
    }
}
